<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	<ui:composition template="/views/layouts/main.xhtml">
	<ui:define name="content">
		<h:form id="formPrincipal">
			<div class="grid_18">
				<div class="grid_6">
					<util:home action="#{cenarioBaseBean.goHome}" />
					<p:commandButton value="#{i18n.btn_Salvar}" action="#{cenarioBaseBean.save}" 
						ajax="false" icon="ui-icon ui-icon-disk" />
					<p:commandButton value="#{i18n.btn_Desistir}" action="#{cenarioBaseBean.goDesistir}" 
						ajax="false" immediate="true" icon="ui-icon ui-icon-cancel" />
				</div>
				<util:titulo value="#{i18n.TituloCenarioBase}" />
				<div class="grid_1">
					<util:help />
				</div>
			</div>
			
			<div class="grid_18">
				<p:messages />
			</div>
			
			<util:label grid="11" value="#{i18n.CenarioBase_NomeFluxo}" />
			<util:label grid="7" value="#{i18n.CenarioBase_CadastradoPor}" />
			<div class="grid_11">
				<p:inputText value="#{cenarioBaseBean.cenarioBaseInstance.nome}" />
			</div>
			<div class="grid_7">
			</div>
			
			<div class="grid_18">
				<p:dataTable id="dataTableFluxosBase" widgetVar="dataTableFluxosBase"
					paginator="true" rows="#{contextoBean.dataTableRows}" dynamic="true" 
					value="#{cenarioBaseBean.cenarioBaseInstance.fluxosBase}" 
					var="var" currentPageReportTemplate="#{contextoBean.paginatorTemplate}"
					rowsPerPageTemplate="#{contextoBean.rowsPerPage}"
					emptyMessage="#{i18n.NenhumClientePortalEncontrado}">
					<p:column headerText="#{i18n.CenarioBase_Indice}">  
			            <h:outputText value="#{var.codFluxo}" />  
			        </p:column>
			        <p:column headerText="#{i18n.CenarioBase_Fluxo}">  
			            <h:outputText value="#{var.acao}" />  
			        </p:column>
				</p:dataTable>
			</div>
		</h:form>
	</ui:define>
	</ui:composition>
</f:view>